<?php
@session_start();
 echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">';

/*
 *  A Part of snock project
 *   Author king-of-war
 * Last modified 2009-4-27
 *
 */

/*
 *   count add moudle
 */
 $root_path='../';
 include_once $root_path . 'admin/smarty_config.php';
include_once $root_path.'admin/class/count.class.php';
include_once $root_path.'admin/class/count_cfg.class.php';
include_once $root_path.'admin/class/fun_common.php';

/*
 *
 * check identify
 */
include_once $root_path.'admin/class/verify.class.php';
$a=new verify($root_path);
$a->identity_check(2);

/*
 * init the class about count
 */
$count = new count($root_path);
$fun= new fun_common($root_path);

/*
 * count date get
 */
$total=$fun->get_part('count','');

$index=$fun->get_part('count',' where page="index"');

$news=$fun->get_part('count',' where page="news"');

$pro=$fun->get_part('count',' where page="pro"');

$con=$fun->get_part('count',' where page="con"');

$cen['index']=$index/$total*600;
$cen['news']=$news/$total*600;
$cen['pro']=$pro/$total*600;
$cen['con']=$con/$total*600;
/*
 * set template
 */
 $smarty->assign("total",$total);
  $smarty->assign("index",$index);
   $smarty->assign("news",$news);
    $smarty->assign("pro",$pro);
     $smarty->assign("con",$con);
        $smarty->assign("cen",$cen);
   $smarty->display("count_view.html");
?>
